<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php if($g_title){ echo $g_title; } ?>-后台首页</title>
<link rel="stylesheet" type="text/css" href="../css/reset.css"/>
<link rel="stylesheet" type="text/css" href="../css/m.css"/>
<script type="text/javascript" src="../js/jquery.js"></script>

<?php

 if(!$_SESSION['uname']&&$g_tab!="login"){
  echo "<script type='text/javascript'>window.location='login.php';</script>";
  return false;
}
?>
<style type="text/css">
.sidebar ul li.curr{
}
</style>
<?php if($g_js){ echo $g_js; } ?>
</head>

<body>
	<div class="wrap admin">
		<div class="inner">
        <?php if($g_tab!="login"){ ?>
			<div class="header">
				<div class="top_bar">
					<div class="act">
						你好! <?php echo $_SESSION['uname']; ?><a href="login_out.php">退出 </a>
					</div>
					<span class="now">现在时间:2010-10-11 11:44:34</span>
				</div>
				<div class="nav">
					<ul>
						<li <?php if($g_tab=='index'){ echo 'class="curr"';} ?>><a href="index.php"><span>后台管理</span></a></li>
						<li><a href="../index.php" target="_blank"><span>前台首页</span></a></li>
					</ul>
				</div>
				<div class="top_search">
					<a class="graybutton" href="notice_send.php"><span>发表公告</span></a>
					<a class="graybutton" href="post_add.php"><span>发表文章</span></a>
				</div>
			</div>
            <?php }else{ ?>
            <div class="header">
				<div class="top_bar">
					<div class="act">
						<a href="../index.php">回到首页-&gt;</a>
					</div>
				</div>
			</div>
            <?php } ?>